*********************************************************************************************
*Replication code for Oliver, Steven, Ryan Jablonski, Justin Hastings. 
*"The Tortuga Disease: The Perverse Effects of Illicit Wealth" Forthcoming International Studies Quarterly (Accepted May 2016)
*Creates Figure A2-A4
*Version 10 June, 2016
*********************************************************************************************

cd "<directory location>"
use RansomData.dta, clear

gen puntland_exports_cap = ((puntland_exports)/pop_puntland)
gen somaliland_exports_cap = ((somaliland_exports)/pop_somaliland)
replace log_somaliland_exports_cap = . if missing(puntland_exports_cap)
egen month_display = group(year month)
sort month_display


#delimit ;
graph twoway  line log_exchange_somaliland   month_display , clwidth(medthick) clpattern(solid) clcolor(black) clcolor(black) 
|| line log_exchange_puntland month_display, clwidth(medthick) clpattern(solid) clcolor(red) clcolor(red) yaxis(1) 

             xlabel(0 "2005" 12 "2006" 24 "2007" 36 "2008" 48 "2009" 60 "2010" 72 "2011" 84 "2012"  96 "2013",   labsize(3.5))
             title(" ", size(4))
             subtitle(" " "" " ", size(3))
             xtitle( "", size(4)  )
             xsca(titlegap(2))
             ysca(titlegap(2))
             ytitle("Real Exchange Rate with USD (log)", size(3.5))
             scheme(s2mono) graphregion(fcolor(white))
			 legend(col(1) order(1 2) label(1 "Somaliland Shilling") 
             label(2 "Somali Shilling (Puntland)"))
		;
#delimit cr

graph export "FigA2.tif", width(3000) replace

#delimit ;
graph twoway  line log_somaliland_imports_cap   month_display , clwidth(medthick) clpattern(solid) clcolor(black) clcolor(black) 
|| line log_puntland_imports_cap month_display, clwidth(medthick) clpattern(solid) clcolor(red) clcolor(red) yaxis(1) 

             xlabel(0 "2005" 12 "2006" 24 "2007" 36 "2008" 48 "2009" 60 "2010" 72 "2011" 84 "2012"  96 "2013",   labsize(3.5))
             title(" ", size(4))
             subtitle(" " "" " ", size(3))
             xtitle( "", size(4)  )
             xsca(titlegap(2))
             ysca(titlegap(2))
             ytitle("Imports per Capita (log USD)", size(3.5))
             scheme(s2mono) graphregion(fcolor(white))
			 legend(col(1) order(1 2) label(1 "Somaliland Imports") 
             label(2 "Puntland Imports"))
		;
#delimit cr

graph export "FigA3.tif", width(3000) replace


#delimit ;
graph twoway  line log_somaliland_exports_cap   month_display , clwidth(medthick) clpattern(solid) clcolor(black) clcolor(black) 
|| line log_puntland_exports_cap month_display, clwidth(medthick) clpattern(solid) clcolor(red) clcolor(red) yaxis(1) 

             xlabel(0 "2005" 12 "2006" 24 "2007" 36 "2008" 48 "2009" 60 "2010" 72 "2011" 84 "2012" 96 "2013",   labsize(3.5))
             title(" ", size(4))
             subtitle(" " "" " ", size(3))
             xtitle( "", size(4)  )
             xsca(titlegap(2))
             ysca(titlegap(2))
             ytitle("Exports per Capita (log USD)", size(3.5))
             scheme(s2mono) graphregion(fcolor(white))
			 legend(col(1) order(1 2) label(1 "Somaliland Exports") 
             label(2 "Puntland Exports"))
		;
#delimit cr

graph export "FigA4.tif", width(3000) replace
